// -----------------------------------------------------------------------------
// Generate By Furion Tools v1.6.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;

#nullable disable

namespace iemtm.WeChat.Core
{
    public partial class ReportToMQTT : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<ReportToMQTT, MasterDbContextLocator>
    {

        public long RptId { get; set; }
        public int? RptType { get; set; }
        public string RptIdStr { get; set; }
        public DateTime? RptTime { get; set; }
        public string dtuId { get; set; }
        public string dtuAlias { get; set; }
        public string BASESTATION { get; set; }
        public string GENSETAREA { get; set; }
        public string EXTENSION { get; set; }
        public double? GENVOLTL1 { get; set; }
        public double? GENVOLTL2 { get; set; }
        public double? GENVOLTL3 { get; set; }
        public double? GENCURRENTL1 { get; set; }
        public double? GENCURRENTL2 { get; set; }
        public double? GENCURRENTL3 { get; set; }
        public bool? SEEMINGMAIN { get; set; }
        public decimal? RUNNINGPERIOD { get; set; }
        public string GENSETNUM { get; set; }
        public short? CSQ { get; set; }
        public double? EXTBATVOLT { get; set; }
        public double? INPUT1VOLT { get; set; }
        public bool? RELAY1STATUS { get; set; }
        public decimal? KWENERGY { get; set; }
        public int? CRANKTIMES { get; set; }
        public int? GENRUNTIMES { get; set; }
        public decimal? GENRUNPERIOD { get; set; }
        public double? INPUT2VOLT { get; set; }
        public double? INPUT3VOLT { get; set; }
        public bool? RELAY3STATUS { get; set; }
        public bool? RELAY4STATUS { get; set; }
        public string GPSPOSITION { get; set; }
        public double? LIBATVOLT { get; set; }
        public bool? RELAY2STATUS { get; set; }
        public double? MAINFREQ { get; set; }
        public double? MAINVOLT { get; set; }
        public double? GENFREQ { get; set; }
        public double? GENVOLTL12 { get; set; }
        public double? GENVOLTL23 { get; set; }
        public double? GENVOLTL31 { get; set; }
        public double? GENPHASEL12 { get; set; }
        public double? GENPHASEL13 { get; set; }
        public decimal? ACTIVEPOWER { get; set; }
        public decimal? REACTIVEPOWER { get; set; }
        public decimal? APPARENTPOWER { get; set; }
        public decimal? POWERFACTOR { get; set; }
        public int? GENRECORDNUM { get; set; }
        public DateTime? DATECLOCK { get; set; }
        public DateTime? GENSTARTTIMENOLOAD { get; set; }
        public DateTime? GENSTARTTIME { get; set; }
        public DateTime? GENSTOPTIME { get; set; }
        public double? TOTCURRENT { get; set; }
        public string GENALARM { get; set; }
        public decimal? KWPOWER { get; set; }
        public bool? BATLOWVOLTALARM { get; set; }
        public string txtSpan { get; set; }
        public double? GpsLat { get; set; }
        public double? GpsLgt { get; set; }
        public double? BasLat { get; set; }
        public double? BasLgt { get; set; }
        public double? GpsLatBD { get; set; }
        public double? GpsLgtBD { get; set; }
        public double? BasLatBD { get; set; }
        public double? BasLgtBD { get; set; }
        public bool? bGpsLoc { get; set; }
        public bool? bBasLoc { get; set; }
        public string LAC { get; set; }
        public string CellID { get; set; }
        public string BaseStationAddr { get; set; }
        public string AreaCode { get; set; }
        public string AreaName { get; set; }
        public string BaseStationName { get; set; }
        public string PrjCode { get; set; }
        public string PrjName { get; set; }
        public string Alarms { get; set; }
        public int? HBI { get; set; }
        public string BaseStationCode { get; set; }
        public int? BaseStationID { get; set; }
        public string CompanyCode { get; set; }
        public int? SWVER { get; set; }
        public string CSQs { get; set; }
        public double? FuelValue { get; set; }
        public string FuelTankId { get; set; }
        public bool? BFuelLowAlarm { get; set; }
        public bool? BReportOK { get; set; }
        public string Sendjson { get; set; }
        public string SendUrl { get; set; }
        public string Sendreturn { get; set; }
        public string BaseStationTTCode { get; set; }
        public DateTime? SendTime { get; set; }
        public string WORKORDER { get; set; }
        public string GeneratorCode { get; set; }
    
        public void Configure(EntityTypeBuilder<ReportToMQTT> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.HasKey(e => e.RptId)
                    .HasName("PK__ReportTo__A50342A57511DDA8");

                entityBuilder.Property(e => e.ACTIVEPOWER).HasColumnType("decimal(18, 3)");

                entityBuilder.Property(e => e.APPARENTPOWER).HasColumnType("decimal(18, 3)");

                entityBuilder.Property(e => e.AreaCode).HasMaxLength(50);

                entityBuilder.Property(e => e.AreaName).HasMaxLength(50);

                entityBuilder.Property(e => e.BASESTATION).HasMaxLength(100);

                entityBuilder.Property(e => e.BaseStationAddr).HasMaxLength(300);

                entityBuilder.Property(e => e.BaseStationCode).HasMaxLength(50);

                entityBuilder.Property(e => e.BaseStationName).HasMaxLength(50);

                entityBuilder.Property(e => e.BaseStationTTCode).HasMaxLength(50);

                entityBuilder.Property(e => e.CSQs).HasMaxLength(1000);

                entityBuilder.Property(e => e.CellID).HasMaxLength(50);

                entityBuilder.Property(e => e.CompanyCode).HasMaxLength(50);

                entityBuilder.Property(e => e.DATECLOCK).HasColumnType("datetime");

                entityBuilder.Property(e => e.EXTENSION).HasMaxLength(100);

                entityBuilder.Property(e => e.FuelTankId).HasMaxLength(50);

                entityBuilder.Property(e => e.GENALARM).HasMaxLength(500);

                entityBuilder.Property(e => e.GENRUNPERIOD).HasColumnType("decimal(18, 4)");

                entityBuilder.Property(e => e.GENSETAREA).HasMaxLength(100);

                entityBuilder.Property(e => e.GENSETNUM).HasMaxLength(100);

                entityBuilder.Property(e => e.GENSTARTTIME).HasColumnType("datetime");

                entityBuilder.Property(e => e.GENSTARTTIMENOLOAD).HasColumnType("datetime");

                entityBuilder.Property(e => e.GENSTOPTIME).HasColumnType("datetime");

                entityBuilder.Property(e => e.GPSPOSITION).HasMaxLength(100);

                entityBuilder.Property(e => e.GeneratorCode).HasMaxLength(50);

                entityBuilder.Property(e => e.KWENERGY).HasColumnType("decimal(18, 3)");

                entityBuilder.Property(e => e.KWPOWER).HasColumnType("decimal(18, 3)");

                entityBuilder.Property(e => e.LAC).HasMaxLength(50);

                entityBuilder.Property(e => e.POWERFACTOR).HasColumnType("decimal(18, 3)");

                entityBuilder.Property(e => e.PrjCode).HasMaxLength(50);

                entityBuilder.Property(e => e.PrjName).HasMaxLength(100);

                entityBuilder.Property(e => e.REACTIVEPOWER).HasColumnType("decimal(18, 3)");

                entityBuilder.Property(e => e.RUNNINGPERIOD).HasColumnType("decimal(18, 4)");

                entityBuilder.Property(e => e.RptIdStr).HasMaxLength(50);

                entityBuilder.Property(e => e.RptTime).HasColumnType("datetime");

                entityBuilder.Property(e => e.SendTime).HasColumnType("datetime");

                entityBuilder.Property(e => e.SendUrl).HasMaxLength(500);

                entityBuilder.Property(e => e.Sendjson).HasMaxLength(4000);

                entityBuilder.Property(e => e.Sendreturn).HasMaxLength(4000);

                entityBuilder.Property(e => e.WORKORDER).HasMaxLength(50);

                entityBuilder.Property(e => e.dtuAlias).HasMaxLength(100);

                entityBuilder.Property(e => e.dtuId).HasMaxLength(50);

                entityBuilder.Property(e => e.txtSpan).HasMaxLength(50);
        }

    }
}

